<?php
namespace app\mxty\model;

use think\Model;
use think\model\concern\SoftDelete;

class Referee extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $table = 'athlon_arena_referee';
    protected $pk = 'referee_id';

    public static function getAll()
    {
      return self::select();
    }

    public static function findRefereeById($refereeId)
    {
      return self::where('referee_id', $refereeId)->findOrEmpty();
    }

    public function selectRefereeByIds($refereeIds)
    {
      return $this->select($refereeIds);
    }

    public function sumRefereesPrice($refereeIds)
    {
      return $this->where('referee_id', 'in', $refereeIds)->sum('price');
    }

    public function selectReferees($refereeIds)
    {
      return $this->select($refereeIds);
    }
}
